package com.study.uploadcsv.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * @author weixiaochun
 * @date 2022/7/19 22:05
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class EsDetectedData implements Serializable {
    /**
     * 站点编码（8位）+车道号（1位）+检测时间（12位yyMMddHHmmss）+自增码（4）
     */
//    private String id;

    /**
     * 站点编码（8位）+车道号（1位）+检测时间（12位yyMMddHHmmss）+自增码（4）
     */
    private String busiNum;

    /**
     * 检测时间（格式：yyyy-MM-dd HH:mm:ss）
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date detectionTime;

    /**
     * 站点编码
     */
    private String siteCode;

    /**
     * 车道号(1位，数字)
     */
    private String roadwayNumber;

    /**
     * 站点类型(0-固定治超站； 3-非现站；4-源头企业;5-移动治超)
     */
    private String siteType;

    /**
     * 车牌号码
     */
    private String vehPlate;

    /**
     * 车牌颜色（0-蓝色；1-黄色；2-黑色；3-白色；4-渐变绿色；5- 黄绿双拼色；6-蓝白渐变色；9-未确定；11-绿色；12-红色）
     */
    private String plateColor;

    /**
     * 接收时间（格式：yyyy-MM-dd HH:mm:ss）
     */
    private String revTime;

    /**
     * 轴数
     */
    private Integer axleNum;

    /**
     * 轴组数
     */
    private Integer axleGroupNum;

    /**
     * 轴组型
     */
    private String axleGroupType;

    /**
     * 车速（单位：km/h）
     */
    private Integer speed;

    /**
     * 加速度（单位：m/s2）
     */
    private Integer acc;

    /**
     * 车长（单位：mm）
     */
    private Integer vehLength;

    /**
     * 车宽（单位：mm）
     */
    private Integer vehWidth;

    /**
     * 车高（单位：mm）
     */
    private Integer vehHeight;

    /**
     * 车货总重（单位：kg）
     */
    private Integer totalWeight;

    /**
     * 轴重1（单位：kg）
     */
    private Integer axleWeight1;

    /**
     * 轴重2（单位：kg）
     */
    private Integer axleWeight2;

    /**
     * 轴重3（单位：kg）
     */
    private Integer axleWeight3;

    /**
     * 轴重4（单位：kg）
     */
    private Integer axleWeight4;

    /**
     * 轴重5（单位：kg）
     */
    private Integer axleWeight5;

    /**
     * 轴重6（单位：kg）
     */
    private Integer axleWeight6;

    /**
     * 轴重7（单位：kg）
     */
    private Integer axleWeight7;

    /**
     * 轴重8（单位：kg）
     */
    private Integer axleWeight8;

    /**
     * 轴1-2距（单位：mm）
     */
    private Integer axleDis1;

    /**
     * 轴2-3距（单位：mm）
     */
    private Integer axleDis2;

    /**
     * 轴3-4距（单位：mm）
     */
    private Integer axleDis3;

    /**
     * 轴4-5距（单位：mm）
     */
    private Integer axleDis4;

    /**
     * 轴5-6距（单位：mm）
     */
    private Integer axleDis5;

    /**
     * 轴6-7距（单位：mm）
     */
    private Integer axleDis6;

    /**
     * 轴7-8距（单位：mm）
     */
    private Integer axleDis7;

    /**
     * 超限量（单位：kg）
     */
    private Integer wholeOver;

    /**
     * 超限标识（0、未超限；1、超限）
     */
    private String overLimitFlag;

    /**
     * 超限率（100*超限量/限重，保留2位小数）
     */
    private Double overRate;

    /**
     * 限重
     */
    private Integer limitWeight;

    /**
     * 限长
     */
    private Integer limitLength;

    /**
     * 限宽
     */
    private Integer limitWidth;

    /**
     * 限高
     */
    private Integer limitHeight;

    /**
     * 单双驱（0-单驱；1-双驱；默认0）
     */
    private String singleOrDouble;

    /**
     * 是否是黑名单（0-不是；1-是）
     */
    private Integer ifBlack;

    /**
     * 是否Gps异常（0-不是；1-是）
     */
    private Integer ifGpsAnomalous;

    /**
     * 是否是无牌车（0-不是；1-是）
     */
    private Integer ifUnlicensed;

    /**
     * 是否是套牌车（0-不是；1-是）
     */
    private Integer ifFakeLicensePlate;

    /**
     * 是否遮挡车牌号（0-不是；1-是）
     */
    private String ifCoverLicensePlate;

    /**
     * 是否是大件运输车（0-不是；1-是）
     */
    private Integer ifMassiveTransport;

    /**
     * 大件运输许可证
     */
    private String massiveTransportPermitNum;

    /**
     * 客货标识（0-货车；1-客车。默认值为0）
     */
    private String truckOrCoach;

    /**
     * 绿通车辆标识（0-否；1-是。默认值为0）
     */
    private String ifGreenPass;

    /**
     * 特种车辆标识（0-否；1-是。默认值为0）
     */
    private String ifSpecial;

    /**
     * 复检标识（0-否；1-是。默认值为0）
     */
    private String ifRecheck;

    /**
     * 车道方向（0-上行；1-下行）
     */
    private String roadwayDirection;

    /**
     * 超限类型（0：未超限，1：超重，2：超尺寸）
     */
    private String overType;

    /**
     * 初检业务号（当数据为初检时传空。为复检时关联初检业务号）
     */
    private String firstBusiNum;

    /**
     * 源头企业名称
     */
    private String sourceEnterpriseName;

    /**
     * 公司名称
     */
    private String companyName;

    /**
     * 经营许可证
     */
    private String businessPermitNum;

    /**
     * 从业资格证书
     */
    private String qualificationCode;

    /**
     * 货物类型
     */
    private String cargoType;

    /**
     * 车主姓名
     */
    private String vehOwnerName;

    /**
     * 驾驶证号
     */
    private String driverLicenseNum;

    /**
     * 驾驶员姓名
     */
    private String driverName;

    /**
     * 道路运输许可证
     */
    private String roadTransportPermitNum;

    /**
     * 复检员姓名
     */
    private String reviewerName;

    /**
     * 车辆许可证
     */
    private String vehLicenseNum;

    /**
     * 插入ES的时间（格式：yyyy-MM-dd HH:mm:ss）
     */
    private Date insertTime;

    /**
     * 轴数标志
     */
    private String axleNumMark;

    /**
     * 车辆类型
     */
    private String carType;

    /**
     * 克隆车牌号
     */
    private String clonePlate;

    /**
     * 完整标识
     */
    private String completeMark;

    /**
     * 车头照片
     */
    private String headPic;

    /**
     * 是否异常（0-否；1-是。默认值为0）
     */
    private String ifUnusual;

    /**
     * 大件运输许可证号
     */
    private String massiveTransportPeimitNum;

    /**
     * 超限标识
     */
    private String overFlagMark;

    /**
     * 车牌照片
     */
    private String platePic;

    /**
     * 车道类型
     */
    private String roadwayType;

    /**
     * 遮盖车牌号
     */
    private String shelterPlate;

    /**
     * 短视频
     */
    private String shortVideo;

    /**
     * 站点名称
     */
    private String siteName;

    /**
     * 车尾图片
     */
    private String tailPic;

    /**
     * 车辆品牌
     */
    private String vehBrand;

    /**
     * 车辆颜色
     */
    private String vehColor;

    /**
     * 车牌标识
     */
    private String vehPlateMark;

    /**
     * 全景图片
     */
    private String wholePic;

    @Override
    public String toString() {
        return busiNum +
                "," + detectionTime +
                "," + siteCode+
                "," + roadwayNumber+
                "," + siteType+
                "," + vehPlate+
                "," + plateColor+
                "," + revTime+
                "," + axleNum +
                "," + axleGroupNum +
                "," + axleGroupType+
                "," + speed +
                "," + acc +
                "," + vehLength +
                "," + vehWidth +
                "," + vehHeight +
                "," + totalWeight +
                "," + axleWeight1 +
                "," + axleWeight2 +
                "," + axleWeight3 +
                "," + axleWeight4 +
                "," + axleWeight5 +
                "," + axleWeight6 +
                "," + axleWeight7 +
                "," + axleWeight8 +
                "," + axleDis1 +
                "," + axleDis2 +
                "," + axleDis3 +
                "," + axleDis4 +
                "," + axleDis5 +
                "," + axleDis6 +
                "," + axleDis7 +
                "," + wholeOver +
                "," + overLimitFlag+
                "," + overRate +
                "," + limitWeight +
                "," + limitLength +
                "," + limitWidth +
                "," + limitHeight +
                "," + singleOrDouble +
                "," + ifBlack +
                "," + ifGpsAnomalous +
                "," + ifUnlicensed +
                "," + ifFakeLicensePlate +
                "," + ifCoverLicensePlate +
                "," + ifMassiveTransport +
                "," + massiveTransportPermitNum +
                "," + truckOrCoach +
                "," + ifGreenPass +
                "," + ifSpecial +
                "," + ifRecheck +
                "," + roadwayDirection +
                "," + overType +
                "," + firstBusiNum +
                "," + sourceEnterpriseName +
                "," + companyName +
                "," + businessPermitNum +
                "," + qualificationCode +
                "," + cargoType +
                "," + vehOwnerName +
                "," + driverLicenseNum +
                "," + driverName +
                "," + roadTransportPermitNum +
                "," + reviewerName +
                "," + vehLicenseNum +
                "," + insertTime +
                "," + axleNumMark +
                "," + carType +
                "," + clonePlate +
                "," + completeMark +
                "," + headPic +
                "," + ifUnusual +
                "," + massiveTransportPeimitNum +
                "," + overFlagMark +
                "," + platePic +
                "," + roadwayType +
                "," + shelterPlate +
                "," + shortVideo +
                "," + siteName +
                "," + tailPic +
                "," + vehBrand +
                "," + vehColor +
                "," + vehPlateMark +
                "," + wholePic;
    }
}
